<script setup>
    import { inject } from "vue"
    // 后代接收
    const money = inject("give")
</script>

<template>
  <div class="child">
    child组件
    <p>{{ money }}</p>
  </div>
</template>

<style scoped>
    .child {
        width: 200px;
        height: 100px;
        background-color: plum;
    }
</style>

